[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+--------+#################################################################
#+-| SELECT |------------------------------------------------------+##########
#| +--------+ The SELECT command activates the specified work area |##########
#+-----------------------------------------------------------------+##########
##############################################################################
##############################################################################
#+--| Syntax |--------------------------+#####################################
#| SELECT <Alias> || <Uint-exp> |#####################################
#+--------------------------------------+#####################################
##############################################################################
##############################################################################
######+---| Description |----------------------------------------------+######
######| Ten work areas are available to SELECT; 1 is the default work |######
######| area. There is no default <Alias>. Only an <Alias> specified |######
######| by USE can be selected. |######
######| -------------------------------------------------------------- |######
######| Use of SELECT <Uint-exp> and the associated command USE is not |######
######| recommended. see OPEN for more details. |######
######+----------------------------------------------------------------+######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * USE databases. |#########
#########| |#########
#########| USE "a:\acc_pay" ALIAS out |#########
#########| SELECT 2 |#########
#########| USE "a:\acc_rec" ALIAS in |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * If the alias override is not used, the SELECT |#########
#########| * value must be used whenever a procedure is entered. |#########
#########| |#########
#########| PROCEDURE append_it |#########
#########| |#########
#########| * SELECT must be set to the proper value |#########
#########| * before append_it is called. |#########
#########| |#########
#########| APPEND BLANK && Appends a blank to |#########
#########| && the current alias |#########
#########| REPLACE z->abc WITH .F. && Replaces this value |#########
#########| && NOTE: |#########
#########| && alias 'z' is assumed |#########
#########| && to be with the |#########
#########| && explicit 'z->abc'. |#########
#########| RETURN |#########
#########| ENDPRO |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| |#########
#########| USE "abc.dbf" ALIAS z |#########
#########| DO append_it |#########
#########| |#########
#########| SELECT 2 |#########
#########| USE "xyz.dbf" ALIAS a |#########
#########| DO append_it && This will cause |#########
#########| && trouble! |#########
#########| |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * If OPEN command is used, the active alias |#########
#########| * can be changed by using SELECT <Alias>. |#########
#########| |#########
#########| OPEN "laptop.dbf" ALIAS small |#########
#########| OPEN "luggable.dbf" ALIAS medium |#########
#########| OPEN "desktop.dbf" ALIAS big |#########
#########| |#########
#########| SELECT big && Makes big the |#########
#########| && current alias. |#########
#########| |#########
#########| APPEND BLANK && Appends a blank to the |#########
#########| && current alias or to big |#########
#########| |#########
#########| !small APPEND BLANK && Appends a blank to small |#########
#########| && even though small is |#########
#########| && not the current alias. |#########
#########| |#########
#########| SELECT medium && Makes medium the |#########
#########| && current alias. |#########
#########| |#########
#########| SELECT 10 && Makes work area 10 |#########
#########| && the current work area. |#########
#########| |#########
#########| APPEND BLANK && Tries to append a blank |#########
#########| && to the file assigned to |#########
#########| && work area 10, causing |#########
#########| && an error because area |#########
#########| && 10 has not been used. |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
OPEN
USE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson